package cn.blog.service.impl;

import cn.blog.dao.BlogDao;
import cn.blog.entity.Blog;
import cn.blog.service.BlogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 项目名：blog
 * 创建人：君忆zm
 * 创建时间：2019/10/20-16:01
 */
@Service("blogService")
public class BlogServiceImpl implements BlogService{

    @Resource
    private BlogDao blogDao;

    @Override
    public List<Blog> countList() {
        return blogDao.countList();
    }

    @Override
    public List<Blog> list(Map<String, Object> map) {
        return blogDao.list(map);
    }

    @Override
    public Long getTotal(Map<String, Object> map) {
        return blogDao.getTotal(map);
    }

    @Override
    public Blog fingById(Integer id) {
        return blogDao.fingById(id);
    }

    @Override
    public Integer add(Blog blog) {
        return blogDao.add(blog);
    }

    @Override
    public Integer update(Blog blog) {
        return blogDao.update(blog);
    }

    @Override
    public Integer delete(Integer id) {
        return blogDao.delete(id);
    }
}
